﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Combat/Combat.master" AutoEventWireup="true" CodeFile="SquadronList.aspx.cs" StylesheetTheme="Content" Inherits="Combat_SquadronList" %>

<%@ Register src="../UserContral/ListPageContral.ascx" tagname="ListPageContral" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:GridView ID="UserGrid" runat="server" AutoGenerateColumns="False" 
        Caption="<span>任务列表</span>" onrowdatabound="UserGrid_RowDataBound">
        <Columns>            
           <asp:TemplateField HeaderText="序号">
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="30px" />
                <ItemTemplate>
                    <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>     
            <asp:TemplateField HeaderText="任务标题">             
                <ItemTemplate>
                   <%# GetTaskTitle(Eval("TaskID"))%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="下达日期">
              <ItemTemplate>
                   <%# GetTaskDate(Eval("TaskID"))%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderStyle-Width="9%">               
                <ItemTemplate>
                <%# (Yipusoft.Exercitation.BLL.TaskBase.GetTaskBase(new Guid(Eval("TaskID").ToString())).EndDate < DateTime.Now && (!(bool)Eval("IsAccept"))) ? "任务已过期" : ""%>
                    <asp:LinkButton ID="lnbtnReceive" OnCommand="lnbtnReceive_Command" CommandArgument='<%# Eval("ID") %>' Visible='<%# ((!(bool) Eval("IsAccept"))&&Yipusoft.Exercitation.BLL.TaskBase.GetTaskBase(new Guid(Eval("TaskID").ToString())).EndDate > DateTime.Now) %>' CommandName='<%# Eval("TaskID") %>' runat="server">接收任务</asp:LinkButton>
                    <asp:LinkButton ID="lnbtnInPut" CommandArgument='<%# Eval("ID") %>' CommandName='<%# Eval("TaskID") %>' Visible='<%# (bool) Eval("IsAccept") %>' PostBackUrl='<%#"InputScore.aspx?TaskID="+ Eval("TaskID").ToString()+"&TaskBrigadeID="+ Eval("TaskBrigadeID").ToString()%>' runat="server">成绩录入</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>            
        </Columns>
        <HeaderStyle HorizontalAlign="Left" />
    </asp:GridView>
    <uc1:ListPageContral ID="ListPageContral1" OnPageSizeChange="ListPageContral1_PageSizeChange" PageSize="20" runat="server" />
</asp:Content>

